package com.xuecheng.auth.controller;

import com.xuecheng.auth.confi.SendTenXunYunSmsUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MsgController {

	@Resource
	private SendTenXunYunSmsUtil sendTenXunSmsUtil;

	@GetMapping("/sendTenXun/{phone}")
	public String sendTenXun(@PathVariable String phone) throws Exception{
    	sendTenXunSmsUtil.send(phone);
    	return "success";
	}
}
